{if $static}

	<img src="http://maps.googleapis.com/maps/api/staticmap?zoom={$zoom|default:'15'}&size={$width|default:'400'}x{$height|default:''}&markers={$lat|default:'0'},{$lng|default:'0'}&sensor=false&maptype={$maptype|default:'roadmap'}&{$free|default:''}" />

{else}

	<script>
	(window.google && window.google.maps) || document.write('<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"><\/script>')
	</script>

	{$id = rand()}
	<div id="map_canvas_{$id}" style="width:{$width|default:'400'}px; height:{$height|default:'400'}px"></div>

	<script>
	  var map_{$id};

	  function initialize_{$id}() {

	  		var latlng = new google.maps.LatLng({$lat|default:'0'}, {$lng|default:'0'});

	        var mapOptions = {
	          zoom: {$zoom|default:'15'},
	          center: latlng,
	          mapTypeId: google.maps.MapTypeId.{$maptype|default:'roadmap'|upper}
	        };

	        map_{$id} = new google.maps.Map(document.getElementById('map_canvas_{$id}'), mapOptions);

			var marker = new google.maps.Marker({
			  map: map_{$id},
			  position: latlng
			});
	  } // initialize_{$id}

	  google.maps.event.addDomListener(window, 'load', initialize_{$id});
	</script>

{/if}